package Controller

import (
	"github.com/gin-gonic/gin"
	"selfService/tool"
)

func UpLoad(c *gin.Context) {
	file, fileHeader, _ := c.Request.FormFile("file")
	fileSize := fileHeader.Size
	url, code := tool.UpLoadFile(file, fileSize)

	tool.Success(c, map[string]string{
		"status":  string(code),
		"url":     url,
	})
}
